{literal}
<script language="javascript">
    function newwindow(url, width, height)
    {        
        var LargeWin=window.open(url,"SmallWin","toolbar=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width="+(width+20)+",height="+(height+20));
        LargeWin.window.focus();
    } 
</script>
{/literal}

<br>	
   &nbsp;&nbsp;&nbsp;<font size="3px">Mail Statistics by user:</font>
<br><br>

	
	<table align1="center" cellpadding="2" cellspacing="2" border="1"> 
		<tr style="background-color: #ffffcf; border: solid 1px #3997FF;">
			<td  align="center"  width="111" >User</td>
			<td  align="center" >Status</td>
			<td  align="center" width1="72">Sent qty (100%)</td>
			<td  align="center" width="92" colspan=2>Visit qty</td>
			<td  align="center" width="92" colspan=2>Buy qty</td>
		</tr>
	{foreach from=$users item=user}
		<tr  style="background-color: #ffffff; border: solid 1px #3997FF;">
			<td  align="left">&nbsp;{$user.name}</td>
			<td  align="center"><font color="#777777">{$user.user}</font></td>
			<td  align="right"><font color="blue">{$user.qty}&nbsp;</font></td>
			<td  align="right" width="44"><font color="blue">{$user.sum_visit}</font></td>
			<td  align="right"><font color="#888888">{if ($user.qty!="" && $user.qty!=0)}{$user.sum_visit/$user.qty*100|string_format:"%.1f"}%{/if}</font></td>
			<td  align="right" width="44"><font color="blue">{$user.sum_buy}</font></td>
			<td  align="right"><font color="#888888">{if ($user.qty!="" && $user.qty!=0)}{$user.sum_buy/$user.qty*100|string_format:"%.1f"}%{/if}</font></td>
			
		</tr>
	{/foreach}
	</table>
		
   
<br><br>
&nbsp;
<input type='button' value='Cancel' class="button" onclick="javascript: history.back();"/>  &nbsp; <input type='button' value='Print' class="button" onclick="newwindow('?{$add_url}&page=print_u&doPrint=doPrint', 800, 600);"/>
